package com.iraeta.service.iraorder.impl;

import com.iraeta.dao.iraorder.IraorderscstepDao;
import com.iraeta.entity.IraOrderScStep;
import com.iraeta.service.iraorder.IraOrderScStepService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class IraOrderScStepServiceImpl implements IraOrderScStepService {
    @Resource
    IraorderscstepDao iraorderscstepDao;

    @Override
    public void addIraOrderScStep(IraOrderScStep iraOrderScStep) {
        iraorderscstepDao.insert(iraOrderScStep);
    }

    @Override
    public void updateIraOrderScStep(IraOrderScStep iraOrderScStep) {
        iraorderscstepDao.updateByPrimaryKey(iraOrderScStep);
    }

    @Override
    public void deleteIraOrderScStep(Integer id) {
        iraorderscstepDao.deleteByPrimaryKey(id);
    }

    @Override
    public IraOrderScStep getIraOrderScStep(Integer id) {
        return iraorderscstepDao.selectByPrimaryKey(id);
    }

    @Override
    public List<IraOrderScStep> listIraOrderScStep(Integer orderId) {
        return iraorderscstepDao.selectByOrderId(orderId);
    }
}
